Category Page Product Filters

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 12 años
How we can apply the Price and specification filter in left column in 2.40 version? Can anybody help?
Hace 12 años
How we can apply the Price and specification filter in left column in 2.40 version? Can anybody help?
Hace 11 años
Edit CategoryTemplate.ProductsInGridOrLines.cshtml file

@section left { <---- add new
    @*filtering*@
    @if (Model.PagingFilteringContext.PriceRangeFilter.Enabled ||
        Model.PagingFilteringContext.SpecificationFilter.Enabled)
    {
        <div class="product-filters">
            <div class="filter-title">
                <span>@T("Filtering.FilterResults")</span>
            </div>
            <div class="filter-item">
                @Html.Partial("_FilterPriceBox", Model.PagingFilteringContext.PriceRangeFilter, new ViewDataDictionary())
            </div>
            <div class="filter-item">
                @Html.Partial("_FilterSpecsBox", Model.PagingFilteringContext.SpecificationFilter, new ViewDataDictionary())
            </div>
        </div>
    }
    <div class="clear">
    </div>
} <---- add new

Edit _ColumnsThree.cshtml file

<div class="master-wrapper-leftside-3">
    @if (IsSectionDefined("left"))
    {
        @RenderSection("left")
    }  <---- remove
    else  <---- remove
    {  <---- remove
        @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.BeforeLeftSideColumn })
        <div class="clear">
        </div>
        @Html.Action("CategoryNavigation", "Catalog", new { currentCategoryId = currentCategoryId, currentProductId = currentProductId })
        <div class="clear">
        </div>   
        @Html.Action("PopularProductTags", "Catalog")
        <div class="clear">
        </div>
        @Html.Action("InfoBlock", "Common")
        <div class="clear">
        </div>
        @Html.Action("PollBlock", "Poll", new { systemKeyword = "LeftColumnPoll" })
        <div class="clear">
        </div>
        @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.AfterLeftSideColumn })
    }
</div>

All done!
Hace 11 años
cdx2000 wrote:
Edit CategoryTemplate.ProductsInGridOrLines.cshtml file

@section left { <---- add new
    @*filtering*@
    @if (Model.PagingFilteringContext.PriceRangeFilter.Enabled ||
        Model.PagingFilteringContext.SpecificationFilter.Enabled)
    {
        <div class="product-filters">
            <div class="filter-title">
                <span>@T("Filtering.FilterResults")</span>
            </div>
            <div class="filter-item">
                @Html.Partial("_FilterPriceBox", Model.PagingFilteringContext.PriceRangeFilter, new ViewDataDictionary())
            </div>
            <div class="filter-item">
                @Html.Partial("_FilterSpecsBox", Model.PagingFilteringContext.SpecificationFilter, new ViewDataDictionary())
            </div>
        </div>
    }
    <div class="clear">
    </div>
} <---- add new

Edit _ColumnsThree.cshtml file

<div class="master-wrapper-leftside-3">
    @if (IsSectionDefined("left"))
    {
        @RenderSection("left")
    }  <---- remove
    else  <---- remove
    {  <---- remove
        @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.BeforeLeftSideColumn })
        <div class="clear">
        </div>
        @Html.Action("CategoryNavigation", "Catalog", new { currentCategoryId = currentCategoryId, currentProductId = currentProductId })
        <div class="clear">
        </div>   
        @Html.Action("PopularProductTags", "Catalog")
        <div class="clear">
        </div>
        @Html.Action("InfoBlock", "Common")
        <div class="clear">
        </div>
        @Html.Action("PollBlock", "Poll", new { systemKeyword = "LeftColumnPoll" })
        <div class="clear">
        </div>
        @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.AfterLeftSideColumn })
    }
</div>

All done!


I tried this, however, when on the home page, the entire left column becomes empty.  No categories, nothing!  
Has anyone found a solution for this?
Hace 11 años
Ok, never mind, figured it out.
Here was my resolution:

<div class="master-wrapper-leftside-3">
    @if (IsSectionDefined("left"))
    {
        @RenderSection("left")
    }  
   else  <---- remove
    {  <---- remove
        @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.BeforeLeftSideColumn })
        <div class="clear">
        </div>
        @Html.Action("CategoryNavigation", "Catalog", new { currentCategoryId = currentCategoryId, currentProductId = currentProductId })
        <div class="clear">
        </div>  
        @Html.Action("PopularProductTags", "Catalog")
        <div class="clear">
        </div>
        @Html.Action("InfoBlock", "Common")
        <div class="clear">
        </div>
        @Html.Action("PollBlock", "Poll", new { systemKeyword = "LeftColumnPoll" })
        <div class="clear">
        </div>
        @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.AfterLeftSideColumn })
    } <---- remove
</div>

Also, the widget can be moved just above the " @if (IsSectionDefined("left"))" line if you don't want it to ne between the filter and the category sections.
Hace 10 años
https://www.nopcommerce.com/boards/t/28565/drop-down-product-filter.aspx
Hace 7 años
Is there an updated process to do this for NopCommerce 3.8?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.